/*
 * Copyright 2020 tu.cn All right reserved. This software is the
 * confidential and proprietary information of tu.cn ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Tu.cn
 */
package com.onedec.project.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 31014
 * @date 2020/6/11 18:38
 */
public class util {
    /**
     * @return 返回一个随机的编码
     */
    public static String getOrderNo() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
        int ran = (int) (Math.random() * 9000 + 1000);
        return "WN" + simpleDateFormat.format(new Date()) + ran;
    }
    public static String getNow() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(new Date());
    }

}